How can I stop my script going out of range

welcome to shbcf.ru